package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Auther: zhaoss
 * @Date: 2023/5/3 - 05 - 03 - 21:08
 * @Description: com.sky.mapper
 * @version: 1.0
 */
@Mapper
public interface OrdersDetailMapper {

    /**
     * 批量新增
     * @param list
     */
    void addOrdersDetailList(List<OrderDetail> list);

    /**
     * 通过订单id查询明细表
     * @param orderId
     * @return
     */
    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> getByOrderId(Long orderId);
}
